// pages/joke/joke.js
Page({
  data: {
    jokes: [
      '冷笑话',
      '普通笑话',
      '浪漫情话',
      '土味情话',
      '心灵鸡汤'
    ],
    status: 1
  },
  onLoad(){
    this.getJokeContent()
  },
  getJokeContent(){
    wx.serviceMarket.invokeService({
      service: 'wxcae50ba710ca29d3',
      api: 'jokebot',
      data: {"mode": this.data.status},
    }).then(res => {
      console.log('invokeService success', res)
    }).catch(err => {
      console.error('invokeService fail', err)
    })
  }
})